﻿@ Page ValidateRequest="false" Language="C#" MasterPageFile="~/Views/Shared/Site.Master"
    Inherits="System.Web.Mvc.ViewPage" 

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    @ViewData["PageTitle"]

<asp:Content ID="Content3" ContentPlaceHolderID="HeaderContent" runat="server">
    <style type="text/css">
        label.error
        {
            float: none;
            color: red;
            padding-left: .5em;
            vertical-align: top;
        }
    </style>
    <link href="/content/app_themes/@ViewData["SkinName"] /css/Forum.css" rel="stylesheet" type="text/css" />

<asp:Content ID="MainContent" ContentPlaceHolderID="MainContent" runat="server">
    <div>
        <div class="spacer_top">
        </div>
        <div id="thecontent" class="thecontent">
        <h1>@ViewData["PageTitle"]</h1>
            <span class="field-validation-error">@Html.ValidationSummary("Create was unsuccessful. Please correct the errors and try again.") 
                @ViewData["message"].ToString() </span><br /> @Html.ActionLink("Forum Code Is On", "FAQ", "MvcCmsForum", null,  new { target = "_blank" }) - Html is <strong>Off</strong>
            
            <form method="post" action="@Url.Action("CreatePost", "Forum") " class="post-create">
            <p class="field input">
                <label for="title">
                    Title</label><br />
                @Html.TextBox("Title")
                @Html.ValidationMessage("Title", "*")
            </p>
            <p class="field input">
                <label for="body">
                    Body</label><br />
                @Html.TextArea("body" )
                @Html.ValidationMessage("body", "*")
            </p>
            <hr />
            @Html.Hidden("forumId", ViewData["ForumID"]) 
            <p>
                <button type="submit" id="post-create-button">
                    Post To Forum</button></p>
            </form>
        </div>
    </div>

<asp:Content ID="SidebarContent" ContentPlaceHolderID="SidebarContent" runat="server">
    Html.RenderPartial("ControlsForum/AdminSidebar"); 

<asp:Content ID="ScriptContent" ContentPlaceHolderID="ScriptContent" runat="server">
    <script src="/Scripts/MvcCms.js" type="text/javascript"></script>

    <script type="text/javascript">
    LoadRecentPosts();
    </script>

    <script type="text/javascript" src="/Areas/MvcCmsForum/scripts/forums.js"></script>


